# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=py3-libevdev
_pyname=python-libevdev
pkgver=0.11
pkgrel=4
pkgdesc="Python3 wrapper around the evdev library"
url="https://python-libevdev.readthedocs.io/en/latest"
arch="noarch"
license="MIT"
depends="libevdev python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://gitlab.freedesktop.org/libevdev/$_pyname/-/archive/$pkgver/$_pyname-$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH=. pytest-3 test/*.py
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="224e2d18915f08d9f02e32845968e0e2eac531ad7f4efe5401de692cdb0980049f3cfd9cb869319e7526dbefd38144ab6e0b52ceba67ab371045ce60d21286da  py3-libevdev-0.11.tar.gz"
